﻿using DbInfra;
using ImageDomain.Agg;
using ImageDomain.DE;
using RestHttpInfras;

namespace ScienceRpcServe;

public static class GrpcInject
{
    /// <summary>
    /// 依赖注入
    /// </summary>
    /// <param name="builder"></param>
    public static void Register(this WebApplicationBuilder builder)
    {
        // 依赖注入
        //builder.Services.AddScoped<IMyDependency, MyDependency>();
        //builder.Services.AddSingleton<IMessageWriter, ConsoleMessageWriter>();

        //builder.Services.AddSingleton<ImageCoreInstance>();

        builder.Services.AddSingleton<IHttpUtil, HttpUtil>();
        builder.Services.AddSingleton<IImageRepository, ImageRepository>();
        builder.Services.AddSingleton<ISplitDicomsDE, SplitDicomsDE>();
        builder.Services.AddSingleton<IArmBoneSegAgg, ArmBoneSegAgg>();

        // upgrade 反射自动依赖注入
    }


    // 注入其他类型 etc

}
